package LeetCode;

import java.util.Scanner;

/**
 * 回文数
 */

public class Main009 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x =sc.nextInt();
        System.out.println(isPalindrome(x));

    }
    public static boolean isPalindrome(int x) {
        if (x<0 || (x % 10 == 0 &&x!=0) ){
            return false;
        }
        int num=x;
        int s=0;
        while (x>0) {
            int c=x%10;
            s=s * 10+ c;
            x= x /10;
        }
        if (num==s) {
            return true;
        }
        return false;
    }
}
